import uviewPlus from 'uview-plus'
import { createSSRApp } from 'vue'
import App from './App.vue'

export function createApp() {
  const app = createSSRApp(App)
  
  // 完整引入uview-plus并初始化
  app.use(uviewPlus)
  
  // 调用uview-plus提供的setConfig方法，设置全局配置
  uni.$u.setConfig({
    // 修改prop默认值
    props: {
      // 修改button组件的默认样式
      button: {
        hairline: false,
        customStyle: {}
      }
    }
  })
  
  return {
    app
  }
}